package br.ufms.odontologico.util;

import java.lang.reflect.Method;

public class ReflectUtils {
	static public Method getIdGetter(Class<?> clazz){
		Method res = null;
		try {
			String nm = clazz.getSimpleName();
			res = clazz.getMethod("getId" + nm);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return res;
	}
	static public Method getIdSetter(Class<?> clazz){
		Method res = null;
		try {
			String nm = clazz.getSimpleName();
			res = clazz.getMethod("setId" + nm,Integer.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return res;
	}
	static public Method getNomeGetter(Class<?> clazz){
		Method res = null;
		try {
			res = clazz.getMethod("getNome");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return res;
	}
	static public Method getNomeSetter(Class<?> clazz){
		Method res = null;
		try {
			res = clazz.getMethod("setNome",String.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return res;
	}
	
	
}
